/*
*  Copyright 2019-2023 Zheng Jie
*
*  Licensed under the Apache License, Version 2.0 (the "License");
*  you may not use this file except in compliance with the License.
*  You may obtain a copy of the License at
*
*  http://www.apache.org/licenses/LICENSE-2.0
*
*  Unless required by applicable law or agreed to in writing, software
*  distributed under the License is distributed on an "AS IS" BASIS,
*  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
*  See the License for the specific language governing permissions and
*  limitations under the License.
*/
package me.zhengjie.front.domain;

import cn.hutool.core.bean.BeanUtil;
import cn.hutool.core.bean.copier.CopyOptions;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import javax.validation.constraints.NotBlank;
import java.io.Serializable;
import java.sql.Timestamp;

/**
* @description /
* @author XX
* @date 2024-04-29
**/
@Data
@TableName("outbound_order")
public class OutboundOrderFront implements Serializable {

    @TableId(value = "id", type = IdType.AUTO)
    @ApiModelProperty(value = "id")
    private Integer id;

    @NotBlank
    @ApiModelProperty(value = "出库单号")
    private String outboundOrderCode;

    @ApiModelProperty(value = "物流公司编码")
    private String logisticsCompanyCode;

    @ApiModelProperty(value = "执行顺序，从低到高执行")
    private Integer priority;

    @ApiModelProperty(value = "状态")
    private String status;

    @ApiModelProperty(value = "下发时间")
    private Timestamp dispatchTime;

    @ApiModelProperty(value = "开始时间")
    private Timestamp startTime;

    @ApiModelProperty(value = "结束时间")
    private Timestamp finishTime;

    @ApiModelProperty(value = "类型")
    private String orderType;

    @ApiModelProperty(value = "是否需要备货 ，1是/0否")
    private Integer needStockUp;

    public void copy(OutboundOrderFront source){
        BeanUtil.copyProperties(source,this, CopyOptions.create().setIgnoreNullValue(true));
    }
}
